import axios from 'axios'

axios.defaults.baseURL = 'https://autumnfish.cn'

export default {
  get(url, params) {
    return new Promise((resolve, reject) => {
      axios
        .get(url, { params })
        .then(res => {
          resolve(res.data)
        })
        .catch(err => {
          // 统一处理报错
          reject(err)
        })
    })
  }
}
